package com.zczc.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @ClassName: MessageType
* @Description: message_type表对应的java bean类
* @author: yishui zhiyubujian@163.com
 */
@Table(name = "message_type")
public class MessageType implements Serializable {
    /**
     * @Fields message_type.id :
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "select uuid()")
    private Integer id;

    /**
     * @Fields message_type.message_code :
     */
    @Column(name = "message_code")
    private String messageCode;

    /**
     * @Fields message_type.message_name :
     */
    @Column(name = "message_name")
    private String messageName;

    /**
     * @Fields message_type.deleted :
     */
    private Boolean deleted;

    private static final long serialVersionUID = 1L;

    /**
     * @return id
     */
    /**
     * @return message_type.id : 返回 
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id
     */
    /**
     * @param id of message_type : 设置 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * @return message_code
     */
    /**
     * @return message_type.message_code : 返回 
     */
    public String getMessageCode() {
        return messageCode;
    }

    /**
     * @param messageCode
     */
    /**
     * @param messageCode of message_type : 设置 
     */
    public void setMessageCode(String messageCode) {
        this.messageCode = messageCode;
    }

    /**
     * @return message_name
     */
    /**
     * @return message_type.message_name : 返回 
     */
    public String getMessageName() {
        return messageName;
    }

    /**
     * @param messageName
     */
    /**
     * @param messageName of message_type : 设置 
     */
    public void setMessageName(String messageName) {
        this.messageName = messageName;
    }

    /**
     * @return deleted
     */
    /**
     * @return message_type.deleted : 返回 
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * @param deleted
     */
    /**
     * @param deleted of message_type : 设置 
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", messageCode=").append(messageCode);
        sb.append(", messageName=").append(messageName);
        sb.append(", deleted=").append(deleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MessageType other = (MessageType) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getMessageCode() == null ? other.getMessageCode() == null : this.getMessageCode().equals(other.getMessageCode()))
            && (this.getMessageName() == null ? other.getMessageName() == null : this.getMessageName().equals(other.getMessageName()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getMessageCode() == null) ? 0 : getMessageCode().hashCode());
        result = prime * result + ((getMessageName() == null) ? 0 : getMessageName().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        return result;
    }
}